package com.example.hello.controller;


import com.example.hello.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * Created by JiWen on 2019/4/29 at Qudian.
 */
@Controller
@RequestMapping("admin")
public class UserController {

    @Resource
    private UserService userService;

    @RequestMapping("/user")
    @ResponseBody
    public Object getUserInfo(Long id){

       return userService.getById(id);
    }

}
